<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>团购列表 - 团购管理</title>
<link href="<?php echo BASE_URL;?>/public/css/admin.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main-wrap">
	<div class="path"><span class="path-icon"></span>当前位置：团购管理<span> &gt; </span>团购列表</div>
    <div class="set-wrap">
        <h4 class="main-title">团购列表<span><span style="float:right"><input type=button value="发布团购" onclick ="location.href='<?php echo URL('mgr/groupon.add', '');?>'"></span></h4>
		<div class="set-area-int">
        	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-border">

                <thead class="td-title-bg">
  					<tr>
    					<td>编号</td>
    					<td>商品名称</td>
						<td>商品品牌</td>
                        <td>商品类型</td>
    					<td>商品价格</td>
						<td>价格单位</td>
						<td>开始时间</td>
						<td>结束时间</td>
						<td>商品运费</td>
						<td>商品税率</td>
						<td>最少人数</td>
						<td>最大人数</td>
						<td>当前人数</td>
						<td>当前折扣</td>
						<td>操作</td>
  					</tr>
                </thead>
              	<tfoot class="tfoot-bg">
					<tr>
						<td colspan="15">
                        <div class="pre-next">
							<?php echo $pager;?>
                        </div>
                        </td>
					</tr>
              	</tfoot>
                <tbody>
					<?php if($list):?>
					<?php foreach($list as $value):?>
						<tr>
							<td><?php echo ++$num;?></td>
							<td><?php echo $value['name'];?></td>
							<td><?php echo $value['brand'];?></td>
							<td><?php echo $value['type'];?></td>
							<td><?php echo $value['price'];?></td>
							<td><?php echo $value['unit'];?></td>
							<td><?php echo $value['start'];?></td>
							<td><?php echo $value['end'];?></td>
							<td><?php echo $value['freight'];?></td>
							<td><?php echo $value['taxrate'];?></td>
							<td><?php echo $value['minpersons'];?></td>
							<td><?php echo $value['maxpersons'];?></td>
							<td><?php echo $value['currentpersons'];?></td>
							<td><?php echo $value['currentdiscount'];?></td>
							<td>
								<a class="cancel-ext" href="<?php echo URL('mgr/groupon.add', 'id=' . $value['id']);?>">修改</a>
								<a class="cancel-ext" href="javascript:if(confirm('您确定删除<?php echo $value['name'];?>吗？')) {window.location.href='<?php echo URL('mgr/groupon.del', 'id=' . $value['id']);?>'}">删除</a>
							</td>
						</tr>
					<?php endforeach;?>
					<?php endif;?>
                </tbody>
			</table>
    	</div>
    </div>
</div>
</body>
</html>
